# SET(CMAKE_VERBOSE_MAKEFILE TRUE)
# SET(MINGW TRUE)
# INCLUDE(FindPythonInterp OPTIONAL)
INCLUDE(COMMON.cmake)

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(Citrus)

## Use BISON & FLEX
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)

## Use wxWidgets
FIND_PACKAGE(wxWidgets COMPONENTS mono)
# SET(wxWidgets_USE_LIBS aui base core html adv xrc net)
# INCLUDE(FindWxConfig.cmake REQUIRED)
INCLUDE(UsewxWidgets)

# binary output dir
IF (WIN32)
    SET(CMAKE_COMPILER_OUTPUT "")
    SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/dist)
    SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/dist)
    ADD_DEFINITIONS(
        -D_UNICODE
        -static-libgcc
    )
ELSE (WIN32)
    SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/dist/bin)
    SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/dist/bin)
ENDIF (WIN32) 

# SET(BUILD_SHARED_LIBS ON)

ADD_SUBDIRECTORY(src)

